Copyright(C) 1994 Terumasa KODAKA , Takeshi KONO


■BRANCH4670 BIOS
               o BRANCH4670 is a product of the BRANCH series subsystem of C&C-NET, NEC's integrated local area network system. 
               o The first generation PC-9864 (network interface set) is compatible with BRANCH4670, and the PC-9864L/U (B4670II interface set) is a network interface board compatible with BRANCH4670II. 
               o BRANCH4670 BIOS is supported in the following environments:
■ Normal Mode
               - PC-9864 first generation + PC-9864-02 (BRANCH BIOS ROM)
               - PC-9864L/U (BIOS ROM is standard)
               * Uses the BRANCH BIOS in the ROM on the interface board.
■ High-Resolution Mode
               - PC-9864 first generation
               * Uses the BRANCH BIOS in the main unit's BIOS ROM. However, the PC-H98 and 98 High-Resolution Board (PC-9821A-E02) do not support BRANCH BIOS.
               - PC-9864L/U
               * Uses the BRANCH BIOS in the ROM on the interface board.
Related
■ High Resolution
                 F800:7FE0h
                 0000:0400h bit 0
■ High Resolution, Normal
                 0000:0480h bit 5
                 0000:049A~04ABh
                 0000:05E5~05E7h
                 INT 1Bh - Function 05h (BRANCH)
                 INT 1Bh - Function 06h (BRANCH)


INT D3h - Function 00h
Category         BRANCH4670 BIOS
Name             SEND MESSAGE
Target           PC-9864 first generation/L/U + Normal
                 PC-9864 first generation/L/U + High Resolution
Input            AL=00h
                 AH=Control data length (always processed as 0)
                 BX=Start address of local RAM data area
                 CX=Send data length
                 DH=Destination socket number (80h, 90h, A0h, B0h)
                 DL=Destination station number
                 DI=Start address of result record (DI+AH+3≦0FFFh)
Output           AL=Return code
                 -------+-----------------------------------------------------------
                 Value  | Content
                 -------+-----------------------------------------------------------
                 00h    | Message was successfully transmitted (no retransmission)
                 01~7Fh | Message was successfully transmitted (retransmitted 1~127 times)
                 80h    | Message was not successfully transmitted (retry count exceeded)
                 81h    | Message data part was longer than the receiver buffer
                 82h    | Message was sent to a socket that was not ready
                 83h    | The length of the message control part differs from the receiver's length
                 84h    | An invalid socket number was specified
                 86h    | An invalid station number was specified 87h, Command could not be executed (hardware error)
                 88h    | Timeout occurred
                 -------+-----------------------------------------------------------
Explanation:   o Sends a message to the specified station's socket. 
               o Sends data from the local RAM, set by the higher-level program, to the specified station's socket. 
               o Notifies the higher-level program of the transmission result.
Related


INT D3h - Function 01h
Category:        BRANCH4670 BIOS
Name:            Unknown
Undocumented
Target:          PC-9864L/U + Normal
                 PC-9864 1st generation/L/U + High-resolution
Input:           AL=01h
                   ■When PC-9864L/U + Normal + 0000:043Bh bit 4=0
                    Same as INT D3h - Function 00h
                   ■When PC-9864L/U + Normal + 0000:043Bh bit 4=1 or
                    PC-9864 1st generation/L/U + High-resolution
                 AH = Control data length
                 BX = Starting address of the local RAM data area
                 CX = Transmission data length
                 DH = Destination socket number (80h, 90h, A0h, B0h)
                 DL = Destination station number
                 SI = Starting address of the result record + 1
Output:          Same as INT D3h - Function 00h
Explanation:   o Same as INT D3h - Function 00h
Related


INT D3h - Function 02h
Category:        BRANCH4670 BIOS
Name:            SETUP RECEIVE
Target:          PC-9864 First Generation, L, U + Normal
                 PC-9864 First Generation, L, U + High Resolution
Input:           AL = 02h
                 AH = Control data length
                 BX = Starting address of local RAM data area
                 CX = Received data length
                 DH = Destination socket number (80h, 90h, A0h, B0h)
                 DI = Starting address of the result record (DI + AH + 3 ≤ 0FFFh)
Output:          AL = Return code
                 -------+-----------------------------------------------------------
                 Value  | Content
                 -------+-----------------------------------------------------------
                 84h    | An invalid socket number was specified.
                 85h    | The specified socket is already in use.
                 87h    | The command could not be executed (hardware error).
                 88h    | Timeout occurred.
                 FEh    | The specified socket has been prepared.
                 -------+-----------------------------------------------------------
Description:   o Prepares the specified socket to receive data into the local RAM area set by the higher-level program. 
               o Sets the result record address in the socket information area of the specified socket. 
               o When the prepared socket successfully receives data, the first byte of the result record (return code) will be written with 00h by the transporter. 
               o A socket that has received data once cannot receive the next data unless it is prepared again using this function. Related


INT D3h - Function 03h
Category:        BRANCH4670 BIOS
Name:            Unknown
Undocumented
Target:          PC-9864L/U + Normal
                 PC-9864 First Generation/L/U + High Resolution
Input:           AL=03h
                 AH=Control data length
                 BX=Starting address of local RAM data area
                 CX=Received data length
                 DH=Destination socket number (80h, 90h, A0h, B0h)
                 ■ PC-9864L/U + Normal
                 DI=Starting address of result record
                 ■ PC-9864 First Generation/L/U + High Resolution
                 SI=Starting address of result record + 1
Output:          Same as INT D3h - Function 02h
Explanation:   o In normal mode, when 0000:043Bh bit 5=0, it performs exactly the same processing as INT D3h - Function 02h.
                 When 0000:043Bh bit 5=1, it skips some processing of INT D3h - Function 02h and executes. Details unknown.
               o In high-resolution mode, it performs the same processing as INT D3h - Function 02h, except for some differences in the registers used.
Related


INT D3h - Function 04h
Category:        BRANCH4670 BIOS
Name:            END RECEIVE
Target:          PC-9864 First Generation/L/U + Normal
                 PC-9864 First Generation/L/U + High Resolution
Input:           AL = 04h
                 DH = Destination socket number (80h, 90h, A0h, B0h)
                 DI = Start address of the result record (DI ≤ 0FFFh)
Output:          AL = Return code
                 -------+-----------------------------------------------------------
                 Value  | Content
                 -------+-----------------------------------------------------------
                 00h    | The specified socket has been released.
                 84h    | An invalid socket number was specified.
                 87h    | Command could not be executed (hardware error).
                 88h    | Timeout occurred.
                 -------+-----------------------------------------------------------
Explanation:   o Releases the specified socket. 
               o The released socket cannot receive data until the SETUP RECEIVE function is executed again.
Related


INT D3h - Function 05h
Category:        BRANCH4670 BIOS
Name:            Unknown
Undocumented
Target:          PC-9864L/U + Normal
                 PC-9864 First Generation/L/U + High Resolution
Input:           AL = 05h
                 DH = Destination socket number (80h, 90h, A0h, B0h)
                 ■ For PC-9864L/U + Normal
                 DI = Start address of the result record
                 ■ For PC-9864 First Generation/L/U + High Resolution
                 SI = Start address of the result record + 1
Output:          Same as INT D3h - Function 04h
Explanation:   o In normal mode, it performs exactly the same processing as INT D3h - Function 04h. 
               o In high-resolution mode, it performs the same processing as INT D3h - Function 04h, except for some differences in the registers used.
Related


INT D3h - Function 06h
Category:        BRANCH4670 BIOS
Name:            INITIALIZE
Target:          PC-9864 First Generation/L/U + Normal
                 PC-9864 First Generation/L/U + High Resolution
Input:           AL = 06h
                 DI = Starting address of the result record (DI ≤ 0FFFh)
Output:          AL = Return code
                 -------+-----------------------------------------------------------
                 Value  | Content
                 -------+-----------------------------------------------------------
                 00-3Fh | Station number of the local station
                 87h    | Command could not be executed (hardware error)
                 88h    | Timeout occurred
                 89h    | BRANCH4670 I/F board not present
                 -------+-----------------------------------------------------------
Description:   o Initializes the BNA and sets up the BRANCH4670 BIOS work area. 
               o Performs the following processes:
                 - Retrieves the status from I/O 008Fh, checks the interrupt number, and sets the interrupt vector. 
                 - Initializes the local RAM. 
                 - Initializes the BNA. 
                 - Initializes the BRANCH4670 BIOS work area. 
                 - Unmasks the interrupt controller. 
                 - Returns the station number of the local station.
Related


INT D3h - Function 07h
Category:        BRANCH4670 BIOS
Name:            Unknown
Undocumented
Target:          PC-9864L/U + Normal
                 PC-9864 First Generation/L/U + High Resolution
Input:           AL = 07h
                 ■ When PC-9864L/U + Normal:
                 DI = Starting address of the result record
                 ■ When PC-9864 First Generation/L/U + High Resolution:
                 SI = Starting address of the result record + 1
Output:          Same as INT D3h - Function 06h
Description:   o In normal mode, when 0000:043Bh bit 3 = 0, it performs exactly the same processing as INT D3h - Function 06h.
                 When bit 3 of 0000:043Bh is 1, some processing of INT D3h - Function 06h is skipped. Details are unknown.
               o In high-resolution mode, the processing is the same as INT D3h - Function 06h, except for some differences in the registers used.
Related


INT D3h - Function 08h
Category:        BRANCH4670 BIOS
Name:            WHO AM I
Target:          PC-9864 First Generation/L/U + Normal
                 PC-9864 First Generation/L/U + High Resolution
Input:           AL = 08h
                 DI = Start address of the result record (DI ≤ 0FFFh)
Output:          AL = Return code
                 -------+-----------------------------------------------------------
                 Value  | Content
                 -------+-----------------------------------------------------------
                 00-3Fh | Station number of the local station
                 87h    | Command could not be executed (hardware error)
                 88h    | Timeout occurred
                 -------+-----------------------------------------------------------
Description:     Notifies the station number of the local station. The station number is set by the DIP switch on the PC-9864 (network interface board).
Related:


INT D3h - Function 09h
Category:        BRANCH4670 BIOS
Name:            Unknown
Undocumented
Target:          PC-9864L/U + Normal
                 PC-9864 First Generation/L/U + High Resolution
Input:           AL = 09h
                 AH = Unknown
                 DH = Unknown
                 ■ When PC-9864L/U + Normal:
                 DI = Start address of the result record
                 ■ When PC-9864 First Generation/L/U + High Resolution:
                 SI = Start address of the result record + 1
Output:          Same as INT D3h - Function 08h
Description:     In normal mode, executing this function with AH=00h and DH=07h performs exactly the same processing as INT D3h - Function 08h. Details are unknown in other cases. 
                 In high-resolution mode, it performs the same processing as INT D3h - Function 08h, except for some differences in the registers used. Related


INT D3h - Function 0Ah
Category:        BRANCH4670 BIOS
Name:            ECHO
Target:          PC-9864 1st generation, L, U + Normal
                 PC-9864 1st generation, L, U + High Resolution
Input:           AL = 0Ah
                 DL = Target station number
                 DI = Start address of the result record (DI ≤ 0FFFh)
Output:          AL = Return code
                 -------+-----------------------------------------------------------
                 Value  | Content
                 -------+-----------------------------------------------------------
                 80h    | No response received from the target station
                 86h    | An invalid station number was specified
                 87h    | Command could not be executed (hardware error)
                 88h    | Timeout occurred
                 C0h    | The target station responded correctly
                 -------+-----------------------------------------------------------
Explanation:     Checks if the target BNA is correctly connected and operational.
Related


INT D3h - Function 0Bh
Category:        BRANCH4670 BIOS
Name:            Unknown
Undocumented
Target:          PC-9864L, U + Normal
                 PC-9864 1st generation, L, U + High Resolution
Input:           AL = 0Bh
                 AH = Unknown
                 DL = Target station number
                 ■ For PC-9864L, U + Normal:
                 DI = Start address of the result record
                 ■ For PC-9864 1st generation, L, U + High Resolution:
                 SI = Start address of the result record + 1
Output:          AL = Return code
Explanation:     When AH is not 00h or FFh, it performs exactly the same processing as INT D3h - Function 0Ah. 
                 When AH is 00h or FFh, the details are unknown. 
                 In high-resolution mode, it performs the same processing as INT D3h - Function 0Ah, except for some differences in the registers used.
Related


INT D3h - Function 0Ch
Category:        BRANCH4670 BIOS
Name:            PEEK/POKE
Target:          PC-9864 First Generation/L/U + Normal
                 PC-9864 First Generation/L/U + High Resolution
Input:           AL = 0Ch
                 AH = PEEK/POKE specification
                   00h: PEEK specification
                   FFh: POKE specification
                 BX = Pico-processor address
                 DL = POKE data (when POKE is specified)
                 DI = Starting address of the result record (DI ≤ 0FFFh)
Output:          AL = Return code
                 -------+-----------------------------------------------------------
                 Value  | Content
                 -------+-----------------------------------------------------------
                 00h    | Successful completion (when POKE is specified)
                 87h    | Command could not be executed (hardware error)
                 88h    | Timeout occurred
                 nnh    | Contents of the specified address of the pico-processor (when PEEK is specified)
                 -------+-----------------------------------------------------------
Explanation:   o Retrieves (PEEK) or modifies (POKE) the internal memory contents of the local BNA.
Table:           Contents of BNA Internal Memory
                 -------+-----------------------------------------------------------
                 Offset | Contents
                 -------+-----------------------------------------------------------
                 00E1h  | Maximum number of retries when message transmission fails (Initial value = 0Ah)
                 00E2h  | Number of trailing flags sent at the end of each packet
                        | (Initial value = 0Ah. User modification prohibited)
                 00E3h  | Coefficient for delay counter (User modification prohibited)
                 00E4h  | Number of leading flags in ACK packet
                 00E5h  | Lost packet counter (User modification prohibited)
                 00E6h  | Collision avoidance interrupt counter (User modification prohibited)
                 00E7h  | ADLC reception status at the time of the last error (User modification prohibited)
                 00E8h  | Interrupt error counter (User modification prohibited)
                 00E9h  | Transfer underrun counter (User modification prohibited)
                 00EAh  | 6854 register value (User modification prohibited)
                 -------+-----------------------------------------------------------
Related


INT D3h - Function 0Dh
Category:        BRANCH4670 BIOS
Name:            Unknown
Undocumented
Target:          PC-9864L/U + Normal
                 PC-9864 Original/L/U + High Resolution
Input:           AL=0Dh
                 ■ When PC-9864L/U + Normal + 0000:043Bh bit 6=0
                 AH=PEEK/POKE specification
                   00h: PEEK specification
                   FFh: POKE specification
                 BX=Picoprocessor address
                 DL=POKE data (when POKE is specified)
                 DI=Start address of the result record
                 ■ When PC-9864L/U + Normal + 0000:043Bh bit 6=1
                   Unknown
                 ■ When PC-9864 Original/L/U + High Resolution
                 SI=Start address of the result record + 1
Output:          AL=Return code
Description:   o In Normal mode, when 0000:043Bh bit 6=0, it performs exactly the same processing as INT D3h - Function 0Ch.
                 When 0000:043Bh bit 6=1, it performs its own unique processing. Details are unknown.
                 In High-resolution mode, it performs the same processing as INT D3h - Function 0Ch, except that some of the registers used are different.


INT D3h - Function 0Eh
Category:        BRANCH4670 BIOS
Name:            PUT DATA
Target:          PC-9864 original/L/U + Normal
                 PC-9864 original/L/U + High Resolution
Input:           AL=0Eh
                 BX = Starting address of the destination local RAM
                 CX = Transfer data length (BX+CX ≤ 0FFFh)
                 DS:SI = Destination main RAM address
Output:          AL = Return code
                 -------+-----------------------------------------------------------
                 Value  | Content
                 -------+-----------------------------------------------------------
                 00h    | Normal termination
                 -------+-----------------------------------------------------------
Description:     Transfers data from main RAM to local RAM.
Related:


INT D3h - Function 0Fh
Category:        BRANCH4670 BIOS
Name:            Unknown
Undocumented
Target:          PC-9864L/U + Normal
                 PC-9864 original/L/U + High Resolution
Input:           AL=0Fh
                 BX = Starting address of the destination local RAM
                 CX = Transfer data length (BX+CX ≤ 0FFFh)
                 DS:SI = Destination main RAM address
Output:          Same as INT D3h - Function 0Eh
Description:     Performs exactly the same processing as INT D3h - Function 0Eh.
Related:


INT D3h - Function 10h
Category:        BRANCH4670 BIOS
Name:            GET DATA
Target:          PC-9864 original/L/U + Normal
                 PC-9864 original/L/U + High Resolution
Input:           AL=10h
                 BX = Starting address of the destination local RAM
                 CX = Transfer data length (BX+CX ≤ 0FFFh)
                 DS:SI = Destination main RAM address
Output:          AL = Return code
                 -------+-----------------------------------------------------------
                 Value  | Content
                 -------+-----------------------------------------------------------
                 00h    | Normal termination
                 -------+-----------------------------------------------------------
Description:     Transfers data from local RAM to main RAM. Related


INT D3h - Function 11h
Category:        BRANCH4670 BIOS
Name:            Unknown
Undocumented
Target:          PC-9864L/U + Normal
                 PC-9864 1st generation/L/U + High Resolution
Input:           AL=11h
                 BX = Starting address of the destination local RAM
                 CX = Transfer data length (BX+CX ≤ 0FFFh)
                 DS:SI = Destination main RAM address
Output:          Same as INT D3h - Function 10h
Explanation:     Performs exactly the same processing as INT D3h - Function 10h.
Related